package com.liyuxiang.graph.model;

import java.util.*;

public class DiagnosisState {
    private String userId;
    private String currentQuery;
    private String intentType;
    private Map<String, Object> symptoms;
    private List<String> conversationHistory;
    private String recommendedDepartment;
    private int questionCount;
    private boolean isCompleted;

    public DiagnosisState() {
        this.symptoms = new HashMap<>();
        this.conversationHistory = new ArrayList<>();
        this.questionCount = 0;
        this.isCompleted = false;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getCurrentQuery() {
        return currentQuery;
    }

    public void setCurrentQuery(String currentQuery) {
        this.currentQuery = currentQuery;
    }

    public String getIntentType() {
        return intentType;
    }

    public void setIntentType(String intentType) {
        this.intentType = intentType;
    }

    public Map<String, Object> getSymptoms() {
        return symptoms;
    }

    public void setSymptoms(Map<String, Object> symptoms) {
        this.symptoms = symptoms;
    }

    public void addSymptom(String key, Object value) {
        this.symptoms.put(key, value);
    }

    public List<String> getConversationHistory() {
        return conversationHistory;
    }

    public void setConversationHistory(List<String> conversationHistory) {
        this.conversationHistory = conversationHistory;
    }

    public void addToHistory(String message) {
        this.conversationHistory.add(message);
    }

    public String getRecommendedDepartment() {
        return recommendedDepartment;
    }

    public void setRecommendedDepartment(String recommendedDepartment) {
        this.recommendedDepartment = recommendedDepartment;
    }

    public int getQuestionCount() {
        return questionCount;
    }

    public void setQuestionCount(int questionCount) {
        this.questionCount = questionCount;
    }

    public void incrementQuestionCount() {
        this.questionCount++;
    }

    public boolean isCompleted() {
        return isCompleted;
    }

    public void setCompleted(boolean completed) {
        isCompleted = completed;
    }
}